package it.yuzuojian.com.mapper;

import it.yuzuojian.com.javaBean.Comment1;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface Comment1Mapper {
    @Select("select * from comment1 where articleId=#{articleId}")
    List<Comment1> findByArticleId(Integer articleId);

    @Insert("insert into comment1 values(null,#{articleId},#{name},#{email1},#{content}" +
            ",#{createTime},#{pId},#{pName},#{pEmail1},#{gId},#{admin})")
    void add(Comment1 comment1);
}
